package com.libinshen.wxpay.common.constant;

/**
 * 该类中记录项目中的所有的常量，或者前缀
 *
 * @Author libinshen
 * @Date 2020/6/13 下午5:35
 **/
public class Constants {


    /**
     * easyExcel 中文件读取，单次批量数据插入数据库的最大临界值
     */
    public static final int BATCH_COUNT = 9;
    public static final String ENDFIX_03 = "XLS";
    public static final String ENDFIX_07 = "XLSX";

    /*Course实体类中使用*/
    public static final String DRAFT = "Draft";//未发布
    public static final String NORMAL = "Normal";//已发布

    /**
     * febs-shiro线程池名称
     */
    public static final String FEBS_SHIRO_THREAD_POOL = "febsShiroThreadPool";
    public static final String FEBS_SHIRO_THREAD_NAME_PREFIX = "febs-shiro-thread-";
    public static final String ORDER_DESC = "desc";

    /**
     * 分隔符
     */
    public static final String AUTHORIZATION = "Authorization";
    public static final String SPLIT_COMMA = ",";
    public static final String SPLIT_UNDERLINE = "_";
    public static final String SPLIT_POUND_SIGN = "#";

    /**
     * 常用数字
     */
    public static final Integer ZERO = 0;
    public static final Integer SEVEN = 7;

    public static final Integer ONE = 1;
    public static final String TWO = "2";
    public static final Integer THREE = 3;
    public static final Integer TWELVE = 12;
    public static final Integer NINE = 9;


    /**
     * redis相关常量
     */
    //第一个是：存储在redis 中的token前缀，token的key 以前缀加id。value是token信息
    public static final String PERMISSION_WEB_USER_INFO = "permission_web_user_token";
    public static final String PERMISSION_WEB = "permission_web_";
    public static final String PERMISSION_API_USER_INFO = "permission_api_user_";
    //阿里云短信一天中发送次数限制
    public static final String SMSCODE = "::code";
    public static final String SMSCOUNT = "::count";

    /**
     * jwt相关常量
     * 时间单位：second
     */
    public static final String TOKEN_PREFIX = "Bearer ";
    public static final String JWT_SECRET = "100tal";
    public static final String JWT_ISS = "tal";
    public static final String JWT_CLAIMS_SYS_ID = "sysId";
    public static final String JWT_CLAIMS_SOURCE = "source";
    public static final String JWT_CLAIMS_USER_ID = "userId";
    public static final String JWT_CLAIMS_WORK_CODE = "workCode";
    public static final long JWT_EXPIRATION = 24 * 60 * 60;
    public static final long JWT_EXPIRATION_REMEMBER = 7 * 24 * 60 * 60;

    /**
     * http request相关常量
     */
    public static final String REQUEST_HEADER_SYS_KEY = "sysKey";
    public static final String REQUEST_HEADER_WORK_CODE = "workCode";
    public static final String REQUEST_HEADER_AUTHORIZATION = "Authorization";
    public static final int REQUEST_HEADER_SYS_KEY_LENGTH = 16;


    /**
     * 系统用户角色相关常量
     */
    public static final Long UPM_SUPPER_SYS_ID = 1L;
    public static final String UPM_ROLE_ADMIN = "ROLE_ADMIN";
    public static final String UPM_ROLE_ADMIN_DESC = "超级管理员";
    public static final String UPM_ROLE_OWNER = "ROLE_OWNER";
    public static final String UPM_ROLE_OWNER_DESC = "管理员";
    public static final String UPM_ROLE_TOURIST = "ROLE_TOURIST";
    public static final String UPM_ROLE_TOURIST_DESC = "游客";

    /**
     * 系统相关常量
     */
    public static final String SYS_URL = "/sys";
}
